Sunan at-Tirmithiy كتاب الحج باب ما جاء ما يقول عند القفول من الحج والعمرة

حَدَّثَنَا عَلِىُّ بْنُ حُجْرٍ أَخْبَرَنَا إِسْمَاعِيلُ بْنُ إِبْرَاهِيمَ عَنْ أَيُّوبَ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ قَالَ كَانَ النَّبِىُّ صلى الله عليه وسلم إِذَا قَفَلَ مِنْ غَزْوَةٍ أَوْ حَجٍّ أَوْ عُمْرَةٍ فَعَلاَ فَدْفَدًا مِنَ الأَرْضِ أَوْ شَرَفًا كَبَّرَ ثَلاَثًا ثُمَّ قَالَ لاَ إِلَهَ إِلاَّ اللَّهُ وَحْدَهُ لاَ شَرِيكَ لَهُ لَهُ الْمُلْكُ وَلَهُ الْحَمْدُ وَهُوَ عَلَى كُلِّ شَىْءٍ قَدِيرٌ آيِبُونَ تَائِبُونَ عَابِدُونَ سَائِحُونَ لِرَبِّنَا حَامِدُونَ صَدَقَ اللَّهُ وَعْدَهُ وَنَصَرَ عَبْدَهُ وَهَزَمَ الأَحْزَابَ وَحْدَهُ. وَفِى الْبَابِ عَنِ الْبَرَاءِ وَأَنَسٍ وَجَابِرٍ. قَالَ أَبُو عِيسَى حَدِيثُ ابْنِ عُمَرَ حَدِيثٌ حَسَنٌ صَحِيحٌ.
The Prophet, peace and blessings of God be upon him, used to [do the following] whenever he returned from a battle or the pilgrimage (1) or ‘umrah (2). While ascending a hill or an elevation, he would testify to God’s greatness three times and then say, “There is no god except Allāh (3) alone; He has no partner. His is the dominion; to Him belongs all praise. He has power over all things. We return(4), repentant, worshipping, seeking [God's pleasure], praising our Lord. God has kept His promise; He came to the aid of His bondsman (5) granting him victory and defeating the confederates alone(6).”
(Ḥajj) The pilgrimage to Makkah and Madīnah during the first half of the month of Thul-Ḥijjah, which is the fifth pillar of Islām. A voluntary short ritual visit to the Sanctified Mosque in Makkah that can be performed at any time of the year. Allāh is the Arabic name for the One and Only God, the same God shared by all monotheistic faiths (the name Allāh is often used by Arabic-speaking Christians and Jews). The name Allāh encompasses all the divine names and attributes of the Lord of the worlds, and hence has vast scopes of meaning. It is for this reason that Muslims consider it unique. Unlike the word 'God', Allāh in Arabic has no inflections of gender or number. Returning to our homes; or he may have also meant returning to God in repentance. Here the Prophet, peace and blessings of God be upon him, is referring to himself. The different factions that united to fight against Islam.